package com.yanqu.road.server.timer.union;

import com.yanqu.road.server.manger.activity.unionwar.UnionWarActivityMgr;
import com.yanqu.road.utils.executor.GeneralTask;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @author ：zfr
 * @date ：2021/2/24 20:25
 */
public class UnionWarActivityTask extends GeneralTask {
    protected Logger logger = LogManager.getLogger(UnionWarActivityTask.class.getName());
    private boolean syncCondition = false;

    @Override
    public void doRun() {
        try {
            UnionWarActivityMgr.checkAddChampion();
        }catch (Exception e) {
            logger.error("union war activity check addChampion task error:", e);
        }

        if (!syncCondition) {
            syncCondition = UnionWarActivityMgr.syncConditionAchieveInfoMap();
        }

    }
}
